use ReconEngine

update conf_menu_maint
set menu_type='Comm'
where menu_name='Home'

update conf_menu_maint
set menu_type='Remit', parent_id=0
where menu_name='Remitter Match Invoice Master'

update mast_role_menu_maint
set role_id = 'SYSADM'
where role_id = 'CorpUsr'

update mast_role_menu_maint
set role_id='CUSTADM'
where role_id='Customer' and menu_id = 1

update mast_role_menu_maint
set role_id='REMIT'
where role_id='Remitter' and menu_id = 1

insert into mast_role_menu_maint
values('CUSTMK', 1, 1, 'user1', GETDATE(), null, GETDATE()),
('CUSTCHK', 1, 1, 'user1', GETDATE(), null, GETDATE())

update mast_role_menu_maint
set role_id='SYSADM'
where role_id='Customer' and menu_id in (17, 5, 7)

update mast_role_menu_maint
set role_id='CUSTADM'
where role_id='Remitter' and menu_id = 5

update mast_role_menu_maint
set role_id = 'CUSTADM'
where role_id='Customer' and menu_id in (11, 14, 16, 18, 21, 22, 23, 5, 6, 8)

update mast_role_menu_maint
set role_id='CUSTMK'
where role_id='Customer' and menu_id in (2, 24, 27, 3)

insert into mast_role_menu_maint
values('CUSTMK', 9, 1, 'user1', GETDATE(), null, GETDATE())

update mast_role_menu_maint
set role_id='CUSTCHK'
where role_id='Customer' and menu_id = 15

insert into mast_role_menu_maint
values('CUSTCHK', 24, 1, 'user1', GETDATE(), null, GETDATE())

update mast_role_menu_maint
set role_id = 'REMIT'
where role_id='Customer' and menu_id = 20

delete from mast_role_menu_maint
where role_id='Customer' and menu_id in (4, 19)

delete from mast_role_menu_maint
where role_id='SYSADM' and menu_id in (14, 16)

delete from mast_role_menu_maint
where role_id='Remitter' and menu_id=11

delete from mast_role_menu_maint
where role_id='Remitter' and menu_id in (14, 8)

update mast_role_menu_maint
set role_id = 'SYSADM'
where menu_id = 25

update conf_menu_maint
set parent_id = 0
where menu_id = 15

update conf_menu_maint
set parent_id=0, menu_link='InvoiceEntry.aspx', menu_type='CUST'
where menu_id=9
